#  @author:   gaccob
#  @date:     2012-12-3
#  @function: lsi lib & tool makefile

include ../../evconn.mk

TARGET_LIB = liblsi.a 
TARGET_BIN = lsi

SRCS := lsi.c lsi_ctl.c lsi_tool.c
OBJS := lsi.o lsi_ctl.o lsi_tool.o

.PHONY: all clean

all: $(TARGET_LIB) $(TARGET_BIN)

${TARGET_LIB}: lsi.o
	${AR} $@ lsi.o
	${CP} $@ ../lib
	@(echo "make LSI lib complete")

${TARGET_BIN}: lsi_ctl.o lsi_tool.o lsi.o
	$(CC) -o $@ $(CCFLAGS) $^ ${LIBS}
	${CP} $@ ../bin
	@(echo "make LSI bin complete")

%.o: %.c
	${CC} -c ${CCFLAGS} -I${INCLUDE} $< -o $@

clean:
	@(rm -f core lsi.o lsi_ctl.o lsi_tool.o ${TARGET_LIB} ${TARGET_BIN})
